package com.whiliong.jxc.action.handler;

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.IHandler;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.handlers.HandlerUtil;

import com.whlilong.jxc.dialog.UserManagerDialog;
import com.whlilong.jxc.sys.SaveLogInfo;

public class UsermanagerHandler extends AbstractHandler implements IHandler {

	@Override
	public Object execute(ExecutionEvent event) throws ExecutionException {
		// TODO Auto-generated method stub
		IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
		Shell subshell = new Shell(window.getShell(), SWT.DIALOG_TRIM);
		UserManagerDialog ud = new UserManagerDialog(subshell, SaveLogInfo.getInstance().getUsername());
		ud.open();
		return null;
	}

}
